package db

const TableNameGoodsPay = TablePrefix + "goods_pay"

type GoodsPay struct {
	BaseModel
	GID    uint  `gorm:"column:gid;type:int(11);default:0;comment:商品id" json:"gid" form:"gid"`           // 商品id
	TypeID uint  `gorm:"column:type_id;type:int(11);default:0;comment:类型id" json:"typeID" form:"typeID"` // 类型id
	Num    int64 `gorm:"column:num;type:int(11);default:0;comment:数量" json:"num" form:"num"`             // 数量
}

func (*GoodsPay) TableName() string {
	return TableNameGoodsPay
}

type GoodsPayHaxOneType struct {
	GoodsPay
	Types Type `gorm:"foreignKey:ID;references:TypeID" json:"types"`
}
